
package com.wobaby.util;

import java.io.PrintStream;
import java.io.PrintWriter;

// Referenced classes of package com.wobaby.util:
//            RenditionException

public class RenditionUncheckedException extends RuntimeException
    implements RenditionException
{

    public RenditionUncheckedException()
    {
        m_wrappedException = null;
    }

    public RenditionUncheckedException(String message)
    {
        super(message);
        m_wrappedException = null;
    }

    public RenditionUncheckedException(Throwable exception)
    {
        this(exception.getMessage(), exception);
    }

    public RenditionUncheckedException(String message, Throwable exception)
    {
        super(message, exception);
        m_wrappedException = null;
        setException(exception);
    }

    public String getMessage()
    {
        return RenditionException.Support.getMessage(this);
    }

    public String getMessageShallow()
    {
        return RenditionException.Support.getMessageShallow(this);
    }

    public String getMessageDeep()
    {
        return RenditionException.Support.getMessageDeep(this);
    }

    public void printStackTrace()
    {
        RenditionException.Support.printStackTrace(this);
    }

    public void printStackTrace(PrintStream printStream)
    {
        RenditionException.Support.printStackTrace(this, printStream);
    }

    public void printStackTrace(PrintWriter printWriter)
    {
        RenditionException.Support.printStackTrace(this, printWriter);
    }

    public void printAllStackTraces()
    {
        RenditionException.Support.printAllStackTraces(this);
    }

    public void printAllStackTraces(PrintStream printStream)
    {
        RenditionException.Support.printAllStackTraces(this, printStream);
    }

    public void printAllStackTraces(PrintWriter printWriter)
    {
        RenditionException.Support.printAllStackTraces(this, printWriter);
    }

    public void setException(Throwable exception)
    {
        m_wrappedException = exception;
    }

    public boolean hasException()
    {
        return m_wrappedException != null;
    }

    public Throwable getException()
    {
        return m_wrappedException;
    }

    public String getThisMessage()
    {
        String msg = super.getMessage();
        if(msg == null)
            return getClass().getName();
        else
            return msg;
    }

    public void printThisStackTrace(PrintWriter printWriter)
    {
        super.printStackTrace(printWriter);
    }

    private Throwable m_wrappedException;
}